<%@ page import="com.Util.MessDao" %>
<%@ page import="com.Bean.Message" %>
<%@ page import="net.sf.json.JSONObject" %>
<%@ page import="java.util.Set" %><%--
  Created by IntelliJ IDEA.
  User: root
  Date: 6/24/19
  Time: 6:28 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>messdao</title>
</head>
<body>

<%
    Set<Message> messageSet=MessDao.selectMessBytkid(1);
    for(Message message : messageSet)
    {
        JSONObject jb = JSONObject.fromObject(message);
        String tojson = jb.toString();
        %>
<%=tojson%></br>
<%=message.getId()%>|<%=message.getUsername()%></br>
<%

    }

%>
</body>
</html>
